precision mediump float;

varying vec2 aCoord;

uniform sampler2D vTexture;

uniform float scalePercent;
uniform float mixturePercent;

void main(){
    vec2 center= vec2(0.5, 0.5);
    //  假设  [0.6,0.6]   0.8  0.8
    vec2 textureCoordinateToUse = aCoord;

    //  [0.6,0.6]  -  [0.5, 0.5]   =    [0.1, 0.1]
    textureCoordinateToUse-=center;
    //  放大系数 [0.1/1.1, 0.1/1.1]   假设  scalePercent   =  1.1
    textureCoordinateToUse = textureCoordinateToUse/scalePercent;
    //[0.09, 0.09]+ [0.5,0.5]  = [ 0.59,0.59]
    textureCoordinateToUse += center;

    //[0.6,0.6]
    vec4 textureColor = texture2D(vTexture, aCoord);


    //      新采样颜色
    vec4 textureColor2= texture2D(vTexture, textureCoordinateToUse);
    gl_FragColor=mix(textureColor, textureColor2, mixturePercent);

}
